package top.guxx.mall.service.impl;

import top.guxx.mall.config.RedisService;
import top.guxx.mall.constants.Constants;
import top.guxx.mall.service.IFavoriteService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author：Guxx
 * @Description：
 * @Date：2025/2/23 3:21
 * @Filename：FavoriteService
 */
public class FavoriteService implements IFavoriteService {
    @Resource
    private RedisService redisService;

    @Override
    public List<String> queryFavoriteProducts(String userId) {
        return redisService.getAllElements(Constants.RedisKey.FAVORITE.getCode() + userId);
    }
}
